Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apply merge version edits atomically #331

Open
wants to merge 2 commits into
base: 6.29.tikv
Choose a base branch
from

Conversation

tabokie
Copy link
Member

@tabokie tabokie commented Mar 16, 2023

No description provided.

@tabokie tabokie requested review from BusyJay and tonyxuqqi March 16, 2023 01:35
// exceeds 1.
if (num_cfs > 1) {
for (size_t i = 0; i < num_cfs; i++) {
cf_edits[i].MarkAtomicGroup(num_cfs - i - 1 /*remaining_entries*/);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if the edit is empty?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fine. It will still be encoded with a special trailing field.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or perhaps we can remove all those empty records before proceed. For example, if all data are in writecf, then only one edit is needed. For rawkv, all data are in default cf.

And if the edit contains too many files, will it be marked as atomic group by itself?

Signed-off-by: tabokie <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants